var li_ = document.querySelectorAll('.to>li')
var nr = document.querySelectorAll(".nr");
var text = document.querySelectorAll(".text");
var span7 = document.querySelectorAll(".span7");
var del = document.querySelectorAll(".delete")
var sp1 = document.querySelector(".sp1")
var num = 0;
setInterval(function(){
	var total = 0;
	for(var i = 0;i<li_.length;i++){
		del[i].index=i;
		del[i].onclick=function(){
			text[this.index].value = 0;
			this.parentNode.parentNode.parentNode.removeChild(li_[this.index])
		}
		var total_sm = nr[i].innerHTML*text[i].value;
		span7[i].innerHTML=total_sm.toFixed(2);
		total = parseFloat(span7[i].innerHTML) + total;
		sp1.innerHTML=total.toFixed(2);
	}
},1000)